﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Manager.ascx.cs" Inherits="NCS.Module.FAQ.Admin.Manager" %>
<%@ Register Assembly="Framework.Web.Controls" Namespace="Framework.Web.Controls" TagPrefix="cc1" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:UpdatePanel ID="UpdatePanel" runat="server">
    <ContentTemplate>
    <table border="0" cellpadding="0" cellspacing="0" width="760">
	<tr>
	    <td align = "center">Lọc theo: <asp:DropDownList runat ="server" ID = "ddlFilter"  AutoPostBack = "true" OnSelectedIndexChanged="ddlFilter_SelectedIndexChanged"></asp:DropDownList><br><br></td>
	</tr>
	<tr>
		<td>
			<asp:gridview id="dgFAQ" runat="server" allowpaging="True" 
			autogeneratecolumns="False"
			OnPageIndexChanging="grv_Danhsach_OnPageIndexChanging" 
				width="100%" OnRowCommand="dgFAQ_RowCommand" CellPadding="4" ForeColor="#333333" GridLines="None">
				<alternatingrowstyle cssclass="Grid_Raw2" BackColor="White" ForeColor="#284775" />
				<rowstyle cssclass="Grid_Raw1" BackColor="#F7F6F3" ForeColor="#333333" />
				<headerstyle font-bold="True" cssclass="Grid_Top" BackColor="#5D7B9D" ForeColor="White"></headerstyle>
				<columns>
					<asp:BoundField datafield="idQ" HeaderText="ID">
						<HeaderStyle Width="1px" />
						<ItemStyle Width="1px" />
					</asp:BoundField>
					<asp:BoundField headertext="STT">
						<headerstyle width="5%"></headerstyle>
					</asp:BoundField>
					<asp:BoundField DataField="ContentQuestion" HeaderText="C&#226;u hỏi" />
					<asp:TemplateField headertext="Thứ tự">
						<headerstyle horizontalalign="Center" width="10%"></headerstyle>
						<itemstyle horizontalalign="Center"></itemstyle>
						<headertemplate>
							<asp:button runat="server" width="61px" cssclass="Button" commandname="sort" text="Sắp xếp"></asp:button>
						</headertemplate>
						<itemtemplate>
							<asp:dropdownlist id="dropIndex" runat="server" width="61px"></asp:dropdownlist>
						</itemtemplate>
					</asp:TemplateField>
					<asp:TemplateField HeaderText="Trạng th&#225;i">
						<headerstyle horizontalalign="Center" width="15%"></headerstyle>
						<itemstyle horizontalalign="Center" />
						<headertemplate>
							<asp:button runat="server" width="100px" cssclass="Button" commandname="status" text="Trạng thái"></asp:button>
						</headertemplate>
						<itemtemplate>
							<asp:dropdownlist id="dropStatus" runat="server" width="100px">
								<asp:listitem value="true">Đ&#227; trả lời</asp:listitem>
								<asp:listitem value="false">Chưa trả lời</asp:listitem>
							</asp:dropdownlist>
						</itemtemplate>
						
					</asp:TemplateField>
					<asp:TemplateField HeaderText="Hiển thị">
						<headerstyle horizontalalign="Center" width="15%"></headerstyle>
						<itemstyle horizontalalign="Center" />
						<headertemplate>
							<asp:button ID="Button1" runat="server" width="100px" cssclass="Button" commandname="show" text="Hiển thị"></asp:button>
						</headertemplate>
						<itemtemplate>
							<asp:dropdownlist id="dropShow" runat="server" width="100px" >
								<asp:listitem value="true">Hiển thị</asp:listitem>
								<asp:listitem value="false">Không hiển thị</asp:listitem>
							</asp:dropdownlist>
						</itemtemplate>
						
					</asp:TemplateField>
					<asp:TemplateField HeaderText="Thao t&#225;c">
						<HeaderStyle Width="150px" />
						<itemstyle horizontalalign="Center"></itemstyle>
						<itemtemplate>
							<asp:Button ID="btnEditQuestion" runat="server" CommandArgument='<%# Eval("idQ") %>'
								CommandName="editquestion" CssClass="Button" Text="Sửa" Width="60px" />&nbsp;
							<asp:Button ID="btnDel" runat="server" CommandArgument='<%# Eval("idQ") %>' CommandName="del"
								CssClass="Button" Text="Xóa" Width="60px" />
						</itemtemplate>
					</asp:TemplateField>
				</columns>
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <EditRowStyle BackColor="#999999" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
			</asp:gridview>
		</td>
	</tr>
	<tr>
		<td height="10">
		</td>
	</tr>
	<tr class="InputBox">
		<td>
			<strong>ID: </strong>
			<asp:TextBox ID="txtID" runat="server" Enabled="False" Width="65px"></asp:TextBox></td>
	</tr>
	<tr>
	    <td>
	        <strong>Tiêu đề: </strong>
	        <asp:TextBox ID ="txttitle" runat ="server"></asp:TextBox>
	    </td>
	</tr>
	<tr>
	    <td>
	        <strong>Lĩnh vực: </strong>
	        <asp:DropDownList ID="ddlField" runat="server" >
	        </asp:DropDownList>
	    </td>
	</tr>
	<tr class="InputBox">
		<td>
			<b>Câu hỏi:</b><br />
			<asp:TextBox ID="txtQuestion" runat="server" Rows="5" TextMode="MultiLine" Width="100%"></asp:TextBox>
			<br />
			<cc1:FCKeditor id="txtAnswer" ToolbarSet="Full" runat="server"></cc1:FCKeditor>
			<asp:Button ID="btnAddNew" runat="server" CssClass="Button" Text="Thêm mới" Width="76px" OnClick="btnAddNew_Click" />
			<asp:Button ID="btnUpdate" runat="server" OnClick="btnUpdate_Click" Text="Cập nhật" CssClass="Button" />
            <asp:Label ID = "lbhiden" runat ="server" Visible = "false"></asp:Label>
			</td>
	</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
